import Home from '@/views/Home'
import Search from '@/views/Search'
import Vue from 'vue'
import VueRouter from 'vue-router'
Vue.use(VueRouter)//vueRouter 插件初始化、

//创建一个路由对象
const router = new VueRouter({
    routes:[
        {path: '/home', component: Home },
        {name: 'search', path: '/search/:words?', component: Search}
    ]
})

export default router